#ifndef GameInput_h
#define GameInput_h

#define VK_LEFT 37
#define VK_RIGHT 39
#define VK_DOWN 40
#define VK_UP 38
#define VK_KEY_A 'A'
#define VK_KEY_S 'S'
#define VK_KEY_D 'D'
#define VK_KEY_W 'W'
#define VK_KEY_SPACE 32
#define VK_KEY_TAB 9
#define VK_KEY_ESC 27

//Define mouse
enum KeyEvent {
    KEY_NONE,
    KEY_DOWN,
    KEY_UP
};

enum MouseEvent
{
    POINTER_NONE,
    POINTER_DOWN,
    POINTER_UP,
    POINTER_DRAGGED
};

class GameInput
{
private:
	static GameInput *gameInput;
    bool keyState[255];
public:
    GameInput();
    virtual ~GameInput();
    //for key
    virtual void KeyEvent(int type, int keyCode);
    
    virtual bool IsKeyDown(int keyCode);

    virtual void ClearState();
   
	//for mouse
    virtual void PointerEvent(int type, int x, int y);

    virtual int GetPointerState();

    static GameInput *GetGameInput();
	
	int pointerState, pointerX, pointerY;   
};
#endif
